﻿/**
 * Licensed under the MIT License
 *
 * Copyright (c) 2010 Laurent Berthelot
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 */
package marcel.display.draw.props
{
	
	/**
	 * Line style properties used by DrawManager to draw a shape.
	 * @author	Laurent Berthelot
	 */
	public class LineProps {
		
		//--------------------------------------------------------------------------
		//
		//  Public vars
		//
		//--------------------------------------------------------------------------
		/**
		 * The thickness of the line in points (0 &lt;= thickness &lt; 0xFF).
		 */
		public var thickness:Number;
		/**
		 *  The hexadecimal color value of the line.
		 */
		public var color:Number;
		/**
		 *  The alpha value of the color of the line.
		 */
		public var alpha:Number;
		/**
		 * Indicates whether to hint strokes to full pixels.
		 */
		public var pixelHinting:Boolean;
		/**
		 * The scale mode to use.
		 */
		public var scaleMode:String;
		/**
		 * The type of caps at the end of lines.
		 */
		public var caps:String;
		/**
		 * The type of joint appearance used at angles.
		 */
		public var joints:String;
		/**
		 * Indicates the limit at which a miter is cut off (0 &lt; miterLimit &lt; 0xFF).
		 */
		public var miterLimit:Number;
		
		//--------------------------------------------------------------------------
		//
		//  Constructor
		//
		//--------------------------------------------------------------------------
		/**
		 * Constructs a new LineProps instance
		 * @param	thickness		The thickness of the line in points (0 &lt;= thickness &lt; 0xFF)
		 * @param	color			The hexadecimal color value of the line.
		 * @param	alpha			The alpha value of the color of the line.
		 * @param	pixelHinting	Indicates whether to hint strokes to full pixels.
		 * @param	scaleMode		The scale mode to use. (flash.display.LineScaleMode)
		 * @param	caps 			The type of caps at the end of lines. (flash.display.CapsStyle)
		 * @param	joints 			The type of joint appearance used at angles. (flash.display.JointStyle)
		 * @param	miterLimit		Indicates the limit at which a miter is cut off (0 &lt; miterLimit &lt; 0xFF).
		 */
		public function LineProps(thickness:Number = 1, color:Number = 0, alpha:Number = 1, pixelHinting:Boolean = false, scaleMode:String = 'normal', caps:String = null, joints:String = null, miterLimit:Number = 3) {
			this.thickness = thickness;
			this.color = color;
			this.alpha = alpha;
			this.pixelHinting = pixelHinting;
			this.scaleMode = scaleMode;
			this.caps = caps;
			this.joints = joints;
			this.miterLimit  = miterLimit;
		}
	}
	
}